package com.xiangxiao.rpan.gateway.dto;

import com.xiangxiao.rpan.gateway.enums.ResponseCode;

/**
 * @Description :
 * @Author dyl
 * @Date 15:17 2018/7/6
 */
public class ResponseBodyDto {


    private  Integer respCode;
    private  String respMessage;
    private  String respRemark;
    private Object data;
    private int total;

    public ResponseBodyDto() {
    }

    public ResponseBodyDto(Integer code,String message,String remark, Object data, int totle) {
        this.respCode = code;
        this.respMessage = message;
        this.respRemark = remark;
        this.data = data;
        this.total = totle;
    }

    public ResponseBodyDto(Integer code,String message,String remark, Object data) {
        this.respCode = code;
        this.respMessage = message;
        this.respRemark = remark;
        this.data = data;
    }

    public ResponseBodyDto(Integer code,String message,String remark) {
        this.respCode = code;
        this.respMessage = message;
        this.respRemark = remark;
    }
    public ResponseBodyDto(Object data, int total) {
        this.data = data;
        this.respCode=  ResponseCode.SUCCESS.getRespCode();
        this.total=total;
    }
    public ResponseBodyDto(Object data) {
        this.data = data;
        this.respCode=ResponseCode.SUCCESS.getRespCode();
    }

    public Integer getRespCode() {
        return respCode;
    }

    public void setRespCode(Integer respCode) {
        this.respCode = respCode;
    }

    public String getRespMessage() {
        return respMessage;
    }

    public void setRespMessage(String respMessage) {
        this.respMessage = respMessage;
    }

    public String getRespRemark() {
        return respRemark;
    }

    public void setRespRemark(String respRemark) {
        this.respRemark = respRemark;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "{\"respCode\":'"+ respCode +"',"
                +"\"respMessage\":'"+ respMessage +"',"
                +"\"respRemark\":'"+ respRemark +"',"
                +"\"data\":"+ "" +","
                +"\"total\":"+ 0
                +"}";
    }
}
